	$(function(){
        //按钮单击时执行
        $("#taobaoke_adminedit_do").click(function(){
			toastr.options = {
			  "closeButton": true,
			  "debug": false,
			  "progressBar": true,
			  "positionClass": "toast-bottom-full-width",
			  "onclick": null,
			  "showDuration": "400",
			  "hideDuration": "1000",
			  "timeOut": "7000",
			  "extendedTimeOut": "1000",
			  "showEasing": "swing",
			  "hideEasing": "linear",
			  "showMethod": "fadeIn",
			  "hideMethod": "fadeOut"
			}
			//输入验证
			if($("#taobaoke_id").val() == ""){  
                toastr.warning("ID不能为空！");  
                $("#taobaoke_id").focus();  
                return false;  
            }
			if($("#taobaoke_bot").val() == ""){  
                toastr.warning("所属机器人ID不能为空！");  
                $("#taobaoke_bot").focus();  
                return false;  
            }
			if($("#taobaoke_pid").val() == ""){  
                toastr.warning("推广PID不能为空！");  
                $("#taobaoke_pid").focus();  
                return false;  
            }  
			if($("#taobaoke_form").val() == ""){  
                toastr.warning("推广渠道PID不能为空！");  
                $("#taobaoke_form").focus();  
                return false;  
            }
			var taobaoke_id = $('#taobaoke_id').val();
			var taobaoke_bot = $('#taobaoke_bot').val();
			var taobaoke_pid = $('#taobaoke_pid').val();
			var taobaoke_type = $('#taobaoke_type').val();
			var taobaoke_form = $('#taobaoke_form').val();
			var taobaoke_beizhu = $('#taobaoke_beizhu').val();
            //Ajax调用处理
            var taobaoke_edit_do = $.ajax({
               type: "POST",
               url: "plus.php?m=taobaoke&c=taobaoke_home&a=taobaoke_adminedit_do",
               data: "taobaoke_id="+taobaoke_id+"&taobaoke_bot="+taobaoke_bot+"&taobaoke_pid="+taobaoke_pid+"&taobaoke_type="+taobaoke_type+"&taobaoke_form="+taobaoke_form+"&taobaoke_beizhu="+taobaoke_beizhu,
               async: false
            }).responseText;
			if (taobaoke_edit_do == "1"){
				toastr.info("修改失败！");
			} else if (taobaoke_edit_do == "2") {
				toastr.success("修改成功！");
			} else {
				toastr.error("请勿提交非法数据！");
			}
         });		 
    });